﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using NOAH.CMS.Repository;

/// <summary>
/// Summary description for NewsCategoryExtensionMethods
/// </summary>
public static class NewsCategoryExtensionMethods
{
    public static BaseCategoryView ConvertFrom(this NewsCategory p)
    {
        BaseCategoryView baseCategory = new BaseCategoryView();

        baseCategory.Name = p.Name;
        baseCategory.ParentID = p.ParentId;
        baseCategory.Link = p.SEOLink;
        baseCategory.Target = p.Target;

        return baseCategory;
    }
}